package com.voe.common;

/** NetEQ Background Noise (BGN) configurations
 */
public enum NetEqBgnModes {

    /** BGN is always on and will be generated when the incoming RTP stream
     *  stops (default).
     */
    kBgnOn(0),
    /** The BGN is faded to zero (complete silence) after a few seconds.
     */
    kBgnFade(1),
    /** BGN is not used at all. Silence is produced after speech extrapolation
     *  has faded.
     */
    kBgnOff(2);
    
    public static NetEqBgnModes fromValue(int value) {
		for (int i=0;i<NetEqBgnModes.values().length;i++) {
			if(NetEqBgnModes.values()[i].getValue() == value)
				return NetEqBgnModes.values()[i];
		}
		return null;
	}

	/**
	 * Constructor.
	 */
	private NetEqBgnModes(int value) {
		this.value = value;
	}

	/**
	 * Get the value.
	 * 
	 * @return the value
	 */
	public int getValue() {
		return value;
	}

	private final int value;
}
